package com.java1412.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDate;

/**
 * @author java1412
 * @since 2025-05-30 15:33
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
@TableName(value = "tb_student")
public class Student implements Serializable {
    @TableId(type = IdType.AUTO) // 数据库自增
    private Integer id;
    private String name;
    private String gender;
    private Integer age;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate birthday;
}
